﻿<%@ Page Title="Generator" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    Inherits="Generator_v3" ValidateRequest="false" CodeBehind="Generator_v3.aspx.cs" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
<%--    <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/themes/base/jquery-ui.css"
        type="text/css" media="all" />--%>
    <link href="Styles/StyleSheet.css" rel="stylesheet" type="text/css" />
    <link href="Styles/start/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css" />
      
    <style type="text/css">
        #FinishedText
        {
            width: 602px;
            height: 36px;
        }
    </style>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    
    <script src="Scripts/jquery-ui-1.9.1.custom/development-bundle/ui/jquery.ui.core.js"
        type="text/javascript"></script>
    <script src="Scripts/jquery-ui-1.9.1.custom/development-bundle/ui/jquery.ui.position.js"
        type="text/javascript"></script>
    <script src="Scripts/jquery-ui-1.9.1.custom/development-bundle/ui/jquery.ui.menu.js"
        type="text/javascript"></script>
    <script src="Scripts/jquery-ui-1.9.1.custom/development-bundle/ui/jquery.ui.widget.js"
        type="text/javascript"></script>
    <script src="Scripts/jquery-ui-1.9.1.custom/development-bundle/ui/jquery.ui.autocomplete.js"
        type="text/javascript"></script>
    <script src="Scripts/jquery-ui-1.9.1.custom/development-bundle/ui/jquery-ui.custom.js"
        type="text/javascript"></script>
    <script src="Scripts/nicEdit.js" type="text/javascript"></script>
    <script src="Scripts/GeneratorV3Scripts.js" type="text/javascript"></script>

    <script src="Scripts/rangy-1.2.3/uncompressed/rangy-core.js" type="text/javascript"></script>
    <script src="Scripts/rangy-1.2.3/uncompressed/rangy-serializer.js" type="text/javascript"></script>
    <script src="Scripts/rangy-1.2.3/uncompressed/rangy-cssclassapplier.js" type="text/javascript"></script>
    <script src="Scripts/rangy-1.2.3/uncompressed/rangy-selectionsaverestore.js" type="text/javascript"></script>

    <style>
        .ui-autocomplete
        {
            max-height: 300px;
            overflow-y: auto; /* prevent horizontal scrollbar */
            overflow-x: hidden; /* add padding to account for vertical scrollbar */
            padding-right: 20px;
        }
        /* IE 6 doesn't support max-height
	 * we use height instead, but this forces the menu to always be this tall
	 */
        * html .ui-autocomplete
        {
            height: 300px;
        }
    </style>

    <div class="panel">
        <br />
        <br />
        <br />
        <br />
        <asp:Label ID="SpecialityLabel" runat="server" Text="Selecteaza specialitatea"></asp:Label>
        <br />
        <asp:DropDownList ID="SelectSpeciality" runat="server" Width="120px" CausesValidation="True"
            DataSourceID="DBConnectionString" DataTextField="NumeSpecialitate" DataValueField="NumeSpecialitate"
            AutoPostBack="True">
            <asp:ListItem Selected="True"></asp:ListItem>
            <asp:ListItem>Spec 1</asp:ListItem>
            <asp:ListItem>Spec 2</asp:ListItem>
            <asp:ListItem>Spec 3</asp:ListItem>
        </asp:DropDownList>
        <asp:SqlDataSource ID="DBConnectionString" runat="server" ConnectionString="<%$ ConnectionStrings:DBConnectionString %>"
            SelectCommand="SELECT [ID], [NumeSpecialitate] FROM [DenumiriSpecialitati] ORDER BY [NumeSpecialitate]">
        </asp:SqlDataSource>
        <br />
        <br />
        <asp:CheckBox ID="ModelActive" runat="server" Text="Model Activ" AutoPostBack="True"
            OnCheckedChanged="ModelActive_CheckedChanged" />
        <br />
        <asp:Label ID="ModelLabel" runat="server" Text="Selecteaza Modelul"></asp:Label>
        <br />
        <asp:DropDownList ID="SelectModel" runat="server" Width="120px" AutoPostBack="True"
            Enabled="False" DataSourceID="ModelDropDownConnectionString" DataTextField="NumeModel"
            DataValueField="NumeModel">
            <asp:ListItem Selected="True"></asp:ListItem>
            <asp:ListItem>Model 1</asp:ListItem>
            <asp:ListItem>Model 2</asp:ListItem>
            <asp:ListItem>Model etc...</asp:ListItem>
        </asp:DropDownList>
        <br />
        <br />
        <asp:Label ID="Label3" runat="server" Text="Selecteaza genul"></asp:Label>
        <br />
        <asp:RadioButtonList ID="MFRadioButtonList" runat="server" RepeatLayout="Flow" OnSelectedIndexChanged="MFRadioButtonList_SelectedIndexChanged"
            AutoPostBack="True">
            <asp:ListItem>Masculin</asp:ListItem>
            <asp:ListItem>Feminin  </asp:ListItem>
            <asp:ListItem Selected="True">Ambele</asp:ListItem>
        </asp:RadioButtonList>
        <asp:SqlDataSource ID="ModelDropDownConnectionString" runat="server" ConnectionString="<%$ ConnectionStrings:DBConnectionString %>"
            SelectCommand="SELECT [ID], [NumeModel], [TextModel], [Specialitate] FROM [DenumiriModele] WHERE ([Specialitate] = @Specialitate)  ORDER BY [NumeModel]">
            <SelectParameters>
                <asp:ControlParameter ControlID="SelectSpeciality" Name="Specialitate" PropertyName="SelectedValue"
                    Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
    </div>
    <h2>
    </h2>
    <div class="multipleWords">
        <h3>
            <asp:Label ID="ModelTextTitle" runat="server" Text="Textul Modelului:" Height="30px"
                Visible="False"></asp:Label></h3>
        <asp:Panel ID="ModelText" runat="server" ScrollBars="Vertical" Width="777px"
            BorderColor="#0099FF" BorderWidth="1px" Visible="False">
            <asp:DataList ID="DataList1" runat="server" DataKeyField="ID" DataSourceID="ModelDataSource">
                <ItemTemplate>
                    <asp:Label ID="TextModelLabel" runat="server" ClientIDMode="Static" Text='<%# Eval("TextModel") %>' />
                    <br />
                </ItemTemplate>
            </asp:DataList>
            <asp:SqlDataSource ID="ModelDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:DBConnectionString %>"
                SelectCommand="SELECT [ID], [NumeModel], [TextModel], [Specialitate] FROM [DenumiriModele] WHERE (([Specialitate] = @Specialitate) AND ([NumeModel] = @NumeModel))">
                <SelectParameters>
                    <asp:ControlParameter ControlID="SelectSpeciality" Name="Specialitate" PropertyName="SelectedValue"
                        Type="String" />
                    <asp:ControlParameter ControlID="SelectModel" Name="NumeModel" PropertyName="SelectedValue"
                        Type="String" />
                </SelectParameters>
            </asp:SqlDataSource>
        </asp:Panel>
        <br />
        <br />
        <h3>
            <asp:Label ID="Label4" runat="server" Text="Textul Generatorului:"></asp:Label></h3>
        <div id="FinishedText" cols="20" rows="2" style="width: 780px; height: 200px;">
        </div>
        <asp:HiddenField ID="HiddenTextArea" runat="server" />
        <asp:HiddenField ID="GenreHiddenTextArea" runat="server" />
        <br />
        <br />
        <br />
        &nbsp;
    </div>
    <div id="imHere2" style="position: absolute; bottom: 100px">
    </div>
</asp:Content>
